package com.rockchip;
/**

 * Created by bowen.luo on 2015/8/12.

 */

public class Gpio

{

	/*

	 * Open GPIO file

	 * @return - file descriptor

	 */

	// can't instantiate this class





	static {

		System.loadLibrary("rockgpio-jni");

	}

	public static native  int getgpionumber(String gpionumber);

	public static native int openGpioDev();

	public static native  int closeGpioDev(int fd);

	public static native  int requestGpio(int fd,int num);

	public static native  int releaseGpio(int fd, int num);

	public static native  int setGpioState(int fd, int num,int state);

	public static native  int getGpioState(int fd, int num);

	public static native  int setGpioInput(int fd, int num);

	public static native  int setRedGpio(int fd, int status);

	public static native  int setGreenGpio(int fd, int status);

	public static native  int setRed2Gpio(int fd, int status);

	public static native  int setGreen2Gpio(int fd, int status);

	public static native  int setRedGpioOne(int fd, int status);

	public static native  int setGreenGpioOne(int fd, int status);

	public static native  int setHostPowerGpio(int fd, int status);

	public static native  int set4GPower(int fd, int status);

	public static native  int setBlLevels(int[] levels);

	public static native  int eepromWrite(int pos, byte[] data);

	public static native  int eepromRead(int pos, int length, byte[] data);

	public static native  float getCurrentTemperatureValues();

	public static native  float getCurrentHumidityValues();

	public static native  double getCurrentPressureValues();

}